public class Data {
    public int year;
    public int month;
    public int day;
    public void setdate(int y,int m,int d){
        this.year = y;
        this.month = m;
        this.day = d;
    }
    public void printdate(){
        System.out.println(this.year  + " 年 " + this.month + " 月 " + this.day + "日");
    }

    public Data(){
        this(2024,2,26);
        System.out.println("这是构造方法");
    }

    public Data(int year, int month, int day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }

    public static void main(String[] args) {
        Data data = new Data();
    }
}
